import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store"; //引用vuex的store
Vue.config.productionTip = false;
import "./mock/mockServe.js";
import TypeNav from "./components/TypeNav"; //引入typeNav文件
Vue.component(TypeNav.name, TypeNav); //注册全局组件 , 直接调用即可

// import { reqGetSearchData } from "./api";
import { reqSearchGoodsInfo } from "@/api";
console.log(reqSearchGoodsInfo);
// console.log(reqGetSearchData({}));

// 引入分页器，
import Pagination from "./components/Pagination";
//把分页器注册成为全局组件
Vue.component(Pagination.name, Pagination);
new Vue({
  render: (h) => h(App),
  router,
  //添加全局事件总线
  beforeCreate() {
    Vue.prototype.$bus = this;
  },
  store, //使用vuex
}).$mount("#app");
